package com.scommunity.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.scommunity.domain.Pay;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Mapper
@Repository
@Transactional(rollbackFor = Exception.class)
public interface PayMapper extends BaseMapper<Pay>{
    List<Pay> findByCondition(Pay pay);
    @Select("select * from sc_pay")
    @Results({
            @Result(property = "ownerId",column = "owner_id"),
            @Result(property = "owner",column = "owner_id",one=@One(select = "com.scommunity.mapper.OwnerMapper.selectById"))
    })
    List<Pay> findAll();
}
